<template>
    <view class="message-contain" :class="[showType == 0 ? 'self-message' : 'of-message']">
        {{ message }}
    </view>
</template>

<script>
export default {
    name: "index",
    props: {
        showType: {
            type: String
        },
        message: {
            type: String
        }

    }
}
</script>

<style scoped lang="scss">
.message-contain {
  max-width: 674upx;
  min-height: 96upx;
  box-sizing: border-box;
  padding: 28upx 40upx;
  font-family: PingFang SC, PingFang SC;
  font-weight: 500;
  font-size: 28upx;
  display: flex;
  align-items: center;
  text-align: left;
  font-style: normal;
  border-radius: 48upx;
  margin-bottom: 28upx;
  line-height: 44upx;
}

.self-message {
  background: linear-gradient(90deg, #4D57F9 0%, #3798FF 100%);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.of-message {
  color: #1A1A1A;
  align-self: flex-start;
  background: url("@/static/images/liao_bg.png") no-repeat;
  background-size: 100% 100%;
}
</style>